package cn.tedu.oop;

public class TestConstructor2 {
    public static void main(String[] args) {
        Student s1=new Student();
        Student s2=new Student("哈哈哈");
        Student s3=new Student("张三",'男',"抬杠",100);

    }

}
class Student{
    String name;
    char gender;
    String major;
    double score;

    public Student(String name, char gender, String major, double score) {
        this.name = name;
        this.gender = gender;
        this.major = major;
        this.score = score;
        System.out.println("我是Student全参构造");
    }

    public Student(){
        System.out.println("我是Student无参构造");
    }

    public Student(String s){
        System.out.println("我是Student含参构造");
    }


}